"""
用户管理模块封装
"""

from zonghe.caw.base_request import BaseRequest


def register(url, test_request, cs):
    """

    :param url: 测试环境2
    :param test_request: BaseRequest
    :param cs: 请求参数
    :return: 注册接口响应
    """

    url = url + "/futureloan/mvc/api/member/register"
    r = test_request.post(url, data=cs)
    return r

def login(url, test_request, cs):
    """

    :param url: 测试环境2
    :param test_request: BaseRequest
    :param cs: 请求参数
    :return: 登录接口响应
    """

    url = url + "/futureloan/mvc/api/member/login"
    r = test_request.post(url, data=cs)
    return r

def recharge(url, test_request, cs):
    """

    :param url: 测试环境2
    :param test_request: BaseRequest
    :param cs: 请求参数
    :return: 充值接口响应
    """

    url = url + "/futureloan/mvc/api/member/recharge"
    r = test_request.post(url, data=cs)
    return r


if __name__ == '__main__':
    register("http://192.168.151.6:8080", BaseRequest(), {"mobilephone": "", "pwd": 123456})